package com.chart.service.impl;

import com.chart.dao.StudentDao;
import com.chart.model.StudentEntity;
import com.chart.service.StudentService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * 学生接口实现类
 */
@Service
@Transactional
public class StudentServiceImpl implements StudentService {

    @Resource
    private StudentDao studentDao;

    @Override
    public void add(StudentEntity student) {
        studentDao.add(student);
    }

    @Override
    public List<StudentEntity> getAll() {
        return studentDao.getAll();
    }

    @Override
    public List<StudentEntity> getListByCondition(StudentEntity student,Integer startScore,Integer endScore,Integer startTotalScore,Integer endTotalScore) {
        return studentDao.getListByCondition(student,startScore,endScore,startTotalScore,endTotalScore);
    }

    @Override
    public void updateStudent(StudentEntity student) {
        studentDao.updateStudent(student);
    }

    @Override
    public void deleteStudent(StudentEntity student) {
        studentDao.deleteStudent(student);
    }
}
